home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1996
/
MacHack 1996.toast
/
Presentations
/
Presentations ’94
/
Timothy Knox
/
Help
/
Help Files
/
Constraints
/
Un+Une=Deux
< prev
Wrap
Text File
|
1994-06-24
|
367b
|
24 lines
;cryptarithmetics: UN+UNE=DEUX
(c)
;;; Variables
(n e x r0 u r1 d)
;;; Constraints
((=? (+ n e) (+ x (* 10 r0)))
(=? (+ r0 u n) (+ u (* 10 r1)))
(=? (+ r1 u) (+ e (* 10 d)))
(<>? n e) (<>? n x) (<>? n u)
(<>? n d) (<>? e x) (<>? e u)
(<>? e d) (<>? x u) (<>? x d)
(<>? u d))
;;; Domains
((0 1 2 3)
(0 1 2 3)
(0 1 2 3)
(0 1)
(0 1 2 3)
(0 1)
(0 1 2 3))